1. Field of the Invention
The present invention relates to an apparatus and a method for performing encryption and decryption of data in a portable terminal More particularly, the present invention relates to an apparatus and a method for performing encryption and decryption of data in a portable terminal, which performs an encryption or decryption operation from a point where the encryption or decryption operation is not generated when power is turned off and then turned on during the encryption or decryption operation.
2. Description of the Related Art
In order to encrypt all data stored in advance in a memory of a portable terminal, a data block is encrypted and then stored, or an operation of decrypting the encrypted data block is performed when the data block stored in the memory is input and output. Further, the performance of the encryption or decryption operation may be improved by selectively connecting a hardware accelerator to implement an actual encryption operation or an actual decryption operation through hardware in the encryption or decryption process.
However, while the encryption or decryption process is performed, that is, before the encryption or decryption process is completed, if power of a portable terminal is turned off, it is not possible to restore user data of the data block.
Further, during the encryption or decryption process, the encryption or decryption process is performed for all the data blocks stored in the memory. However, there exists a data block, in which actual data is not stored, among all the data blocks stored in the memory. Therefore, an encryption or decryption process for a data block, in which actual data is not stored, has a problem of increasing the amount of time it takes to perform the encryption or decryption operation.